package com.jifen.mch.dao;

import com.jifen.agent.vo.MarketVo;
import com.jifen.agent.vo.MchVo;
import com.jifen.common.BaseDao;
import com.jifen.mch.entity.Industry;
import com.jifen.mch.entity.Mch;
import com.jifen.mch.vo.MchInfoVo;
import com.jifen.mch.vo.MchParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MchDao extends BaseDao<Mch> {

    Mch getByUid(int uid);

    int getJifenGiveRatio(int id);

    void updateJifen(MchParam param);

    List<Mch> selectPage(MchParam param);

    List<Industry> getIndustrys();

    List<MarketVo> getMarketByAgent(MchParam param);

    List<MchVo> getMchByAgent(MchParam param);

    Integer getIdByMuid(int muid);

    Integer getAgentId(int id);

    int getJifen(int id);

    /**
     * 查询邀请商家
     * @param uid
     * @param pageNo
     * @param pageSize
     * @return
     */
    List<MchInfoVo> getByInvite(@Param("uid")int uid, @Param("pageNo")int pageNo, @Param("pageSize")int pageSize);

    /**
     * 查询邀请总数
     * @param uid
     * @return
     */
    int getInviteNum(int uid);
}
